<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <meta name="format-detection" content="telephone=no" />
    <title>IPFS资产明细</title>
    <link rel="stylesheet" href="../../css/reset.css" />
    <style>
        body {
            width: 100%;
            background-color: #F8F8F8;
            font-size: 0.26rem;
            height: auto;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            font-family: PingFang SC;
            color: #333333;
            padding: 0 0.3rem;
            box-sizing: border-box;
            padding-top: 0.3rem;
        }

        .ipfsList li img.transform {
            transform: rotate(180deg);
            -ms-transform: rotate(180deg);
            /* Internet Explorer */
            -moz-transform: rotate(180deg);
            /* Firefox */
            -webkit-transform: rotate(180deg);
            /* Safari 和 Chrome */
            -o-transform: rotate(180deg);
            /* Opera */
        }

        .showcointype {
            width: 100%;
            height: auto;
            background: linear-gradient(-87deg, rgba(255, 204, 53, 1), rgba(255, 219, 87, 1));
            padding-top: 0.1rem;
            border-radius: 0.08rem;
        }

        .showcointype ul {
            width: 100%;
            height: auto;
            box-sizing: border-box;
        }

        .showcointype ul li {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 0.32rem 0 0.36rem;
            box-sizing: border-box;
        }

        .btcNum {
            font-size: 0.36rem;
            font-family: PingFang SC;
            font-weight: bold;
            color: rgba(38, 38, 38, 1);
        }

        .showcointype ul li:first-of-type {
            margin-top: 0.3rem;
            margin-bottom: 0.3rem;
        }

        .showcointype ul li:nth-of-type(2) {
            border-top: 1px solid #E6BE33;
        }

        .showcointype ul li:first-of-type>span:last-of-type {
            font-size: 0.24rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 0.69);
            line-height: 0.48rem;
        }

        .showcointype ul li:first-of-type>span:last-of-type>span {
            font-size: 0.28rem;
            font-family: DIN Medium;
            font-weight: 400;
            color: rgba(38, 38, 38, 1);
        }

        .showcointype ul li:nth-of-type(2) {
            font-size: 0.28rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 0.98);
            line-height: 0.48rem;
            padding-top: 0.25rem;
            padding-bottom: 0.25rem;
        }

        .showcointype ul li:nth-of-type(2) img {
            width: 0.19rem;
            height: 0.11rem;
        }

        .showcointype ul li:nth-of-type(3),
        .showcointype ul li:nth-of-type(4) {
            font-size: 0.24rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 0.69);
            line-height: 0.48rem;
        }

        .showcointype ul .hideCalss {
            display: none;
        }

        .showlist {
            width: 6.9rem;
            height: auto;
            background-color: #fff;
            padding-top: 0.37rem;
            margin-top: 0.3rem;
            padding-bottom: 0.26rem;
            border-radius: 0.08rem 0.08rem 0 0;
        }

        .listTitle {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.3rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 0.95);
        }

        .listTitle span {
            margin: 0 0.23rem;
        }

        .listTitle img {
            width: 0.22rem;
            height: 0.17rem;
        }

        .listbody {
            width: 100%;
            height: auto;
            min-height: 8rem;
            box-sizing: border-box;
            background-color: #fff;
            position: relative;
            padding-bottom: 0.8rem;
        }

        .loadMore {
            text-align: center;
            position: absolute;
            bottom: 0.4rem;
            left: 40%;
        }

        .loadMore>span {
            height: 0.48rem;
            padding: 0 0.3rem;
            color: #5A5E65;
            font-size: 0.22rem;
            display: inline-block;
            line-height: 0.48rem;
            border: 0.01rem solid#DCDCDC;
        }

        .toBtm {
            text-align: center;
            padding: .3rem 0;
            font-size: 0.22rem;
            color: #a4a4a4;
        }

        .ipfsList {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            padding-bottom: 0.5rem;
        }

        .ipfsList>li {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            border-bottom: 1px solid #EFEFEF;
        }

        .liitemup {
            width: 100%;
            height: 1.34rem;
            display: flex;
            display: -webkit-flex;
            align-items: stretch;
            justify-content: space-between;
        }

        .liitemup li {
            width: 25%;
            height: 1.34rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: center;
        }

        .liitemup li:not(:nth-of-type(3)) {
            padding-left: 0.2rem;
            box-sizing: border-box;
        }

        .liitemup li span {
            font-size: 0.2rem;
            color: #999999;
        }

        .liitemup li span:last-of-type {
            color: #595959;
            margin-top: 0.1rem;
        }

        .liitemdown {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: stretch;
            justify-content: space-between;
            background-color: #F9F9F9;
        }

        .liitemdown li {
            width: 25%;
            min-height: 1.02rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: center;
        }

        .liitemdown li:not(:nth-of-type(3)) {
            padding-left: 0.2rem;
            box-sizing: border-box;
        }

        .liitemdown li:last-of-type {
            display: flex;
            display: -webkit-flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
        }

        .liitemdown li span {
            font-size: 0.2rem;
            color: #999999;
        }

        .liitemdown li span:last-of-type {
            color: #595959;
            margin-top: 0.1rem;
        }

        .showImgcalss {
            width: 0.6rem;
            text-align: center;
            position: absolute;
            top: 1rem;
            left: 44%;
        }
    </style>
</head>

<body>
    <div class="showcointype">
        <ul>
            <li>
                <span class="btcNum">
                    FIL
                </span>
                <span>
                    可用:
                    <span class="canuse">
                        --
                    </span>
                </span>
            </li>
            <li>
                <span>
                    冻结
                </span>
                <span class="frezzcoinNum">
                    --
                </span>
            </li>
        </ul>
    </div>
    <div class="showlist">
        <p class="listTitle">
            <img src="../../image/iconcasdx.png">
            <span>
                冻结记录明细
            </span>
            <img src="../../image/icondkpx.png">
        </p>
    </div>
    <div class="listbody">
        <ul class="ipfsList">
            <!-- <li>
                <ul class="liitemup">
                    <li>
                        <span>
                            冻结日期
                        </span>
                        <span>
                            2019/02/05
                        </span>
                    </li>
                    <li>
                        <span>
                            冻结总量
                        </span>
                        <span>
                            --
                        </span>
                    </li>
                    <li>
                        <span>
                            解冻日期
                        </span>
                        <span>
                            主网上线+90天
                        </span>
                    </li>
                    <li>
                        <span>
                            已解冻
                        </span>
                        <span>
                            --
                        </span>
                    </li>
                </ul>
                <ul class="liitemdown" style="display: none;">
                    <li>
                        <span>
                            冻结中
                        </span>
                        <span>
                            0
                        </span>
                    </li>
                    <li>
                        <span>
                            状态
                        </span>
                        <span>
                            已解冻
                        </span>
                    </li>
                    <li>
                        <span>
                            释放周期
                        </span>
                        <span>
                            --
                        </span>
                    </li>
                    <li>
                        <span>
                            备注
                        </span>
                        <span>
                            战队活动
                        </span>
                    </li>
                </ul>
                <span class="showImgcalss">
                    <img src="../../image/iconcxa.png" style="width: 0.22rem;">
                </span>
            </li> -->
        </ul>
        <p class="toBtm" style="display: none;">到底了</p>
        <p class="loadMore" style="display: none;">
            <span class="moreBtn">加载更多</span>
        </p>
    </div>
</body>
<script src="../../script/autosize.js"></script>
<script src="../../script/jquery_three_two_one.js"></script>
<script src="../../script/fastclick.js"></script>
<script src="../../script/app.js"></script>
<script src="../../script/dotmin.js"></script>
<script>
    apiready = function () {
        var app = new APP();
        var curPage = 1, /*当前页*/
            account = app.getAccount(),
            totalPage = 1,/*总页数*/
            pageSize = 10;/*每页加载数量*/
        $(".canuse").text(api.pageParam.coinNum);
        $(".frezzcoinNum").text(api.pageParam.freeeNum);
        function loadpage(isdown) {
            app.ajaxPro({
                url: "member/get-freeze-info",
                values: {
                    token: account.token,
                    currencyCode: "FIL",
                    type: "",
                    page: curPage,
                    pageSize: 20
                },
                openFlower: true
            }, function (ret) {
                if (ret.code == 200) {
                    totalPage = ret.data.totalPage;
                    if (totalPage > 1) {
                        $(".loadMore").show();
                    }
                    if (curPage > totalPage) {
                        $(".loadMore").hide();
                    }
                    ret.data.list.map(function (item) {
                        item.startDate = item.startDate ? item.startDate : item.ext;
                        item.unfreezeNum = item.unfreezeNum || "--";
                        if ((item.type == 3 && item.unfreezeDays == 0) || item.type == 1) {
                            item.unfreezeDays = "--";
                        } else {
                            item.unfreezeDays = item.unfreezeDays + "天";
                        }
                    })
                    var temp = doT.template($("#mdlist").text());
                    if (isdown) {
                        $(".ipfsList").html(temp(ret.data.list));
                    } else {
                        $(".ipfsList").append(temp(ret.data.list));
                    }
                    if (ret.data.list.length == 0 || ret.data.list.length < 20) {
                        if (curPage == 1 && ret.data.list.length == 0) {
                            $(".toBtm").show().text("暂无数据");
                        } else {
                            $(".toBtm").show().text("暂无更多的数据了");
                        }
                    }
                } else {
                    app.toast(ret.message);
                }
            })
        }
        loadpage(true);
        //点击加载更多
        $(".moreBtn").click(function () {
            if (curPage <= totalPage) {
                curPage++;
                loadpage(false);
            }
        });
        $(".ipfsList").on("click", ".liitemup", function () {
            var itemName = $(this).attr("data-className");
            $("." + itemName).slideToggle(80);
            $(".new" + itemName).toggleClass('transform');
        });
        app.headerMap();
    }
</script>
<script type="text/html" id="mdlist">
    {{~it:it:index}}
    <li>
        <ul class="liitemup" data-className="showImgcalss{{=index}}">
            <li>
                <span>
                    冻结日期
                </span>
                <span>
                    {{=it.keepAccountsDate}}
                </span>
            </li>
            <li>
                <span>
                    冻结总量
                </span>
                <span>
                    {{=it.num}}
                </span>
            </li>
            <li>
                <span>
                    解冻日期
                </span>
                <span>
                    {{=it.startDate}}
                </span>
            </li>
            <li>
                <span>
                    已解冻
                </span>
                <span>
                    {{=it.unfreezeNum}}
                </span>
            </li>
        </ul>
        <ul class="liitemdown showImgcalss{{=index}}" style="display: none;">
            <li>
                <span>
                    冻结中
                </span>
                <span>
                    {{=it.freezeNum}}
                </span>
            </li>
            <li>
                <span>
                    状态
                </span>
                <span>
                    {{?it.status==1}}
                        冻结 
                    {{??it.status==2}}
                        解冻中
                    {{??}}
                        解冻完
                    {{?}}
                </span>
            </li>
            <li>
                <span>
                    释放周期
                </span>
                <span>
                    {{=it.unfreezeDays}}
                </span>
            </li>
            <li>
                <span>
                    备注
                </span>
                <span>
                    {{=it.remark}}
                </span>
            </li>
        </ul>
        <span class="showImgcalss">
            <img src="../../image/asjdlfj.png" class="newshowImgcalss{{=index}}" style="width:0.22rem;">
        </span>
    </li>
    {{~}}
</script>

</html>